﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Everynet;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;
using System.Linq.Expressions;
using System.Web.Mvc.Html;

namespace Everynet.Models
{
    public class signUpModel
    {

        #region[Users]
        public Int64 ID { get; set; }

        [RegularExpression(@"^.{2,}$", ErrorMessage = "Min. 2 characters allowed")]
        [StringLength(50, ErrorMessage = "Max. 50 characters allowed")]
        [Required(ErrorMessage = "Please enter First Name")]
        [Display(Name = "First Name")]
        public string FirstName { get; set; }

        [RegularExpression(@"^.{2,}$", ErrorMessage = "Min. 2 characters allowed")]
        [StringLength(50, ErrorMessage = "Max. 50 characters allowed")]
        [Required(ErrorMessage = "Please enter Last Name")]
        [Display(Name = "Last Name")]
        public string LastName { get; set; }

      
        [RegularExpression(@"^[0-9]{10}$", ErrorMessage = "This is not a valid phone number.")]
        [Display(Name = "Mobile Phone Number")]
        public String MobileNumber { get; set; }
       
        [RegularExpression(@"^[0-9]{10}$", ErrorMessage = "This is not a valid phone number.")]
        [Required(ErrorMessage = "Please enter Service Phone Number")]
        [Display(Name = "Service Phone Number")]
        public String ServicePhoneNumber { get; set; }


        [StringLength(50, ErrorMessage = "Max. 50 characters allowed")]
        [Required(ErrorMessage = "Please enter Contact Email Address")]
        [Display(Name = "Contact Email Address")]
        [RegularExpression("^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$", ErrorMessage = "please enter valid Email")]
        public string Email { get; set; }

        [StringLength(100, ErrorMessage = "Max. 100 characters allowed")]
        [Required(ErrorMessage = "Please enter Service Address")]
        [Display(Name = "Service Address")]
        public string ServiceAddress { get; set; }

        [Required(ErrorMessage = "Please enter City")]
        [Display(Name = "City")]
        public String City { get; set; }

        [Required(ErrorMessage = "Please enter State")]
        [Display(Name = "State")]
        public String State { get; set; }

        [RegularExpression(@"^[0-9]{4}$", ErrorMessage = "This is not a valid Post code.")]
        [Required(ErrorMessage = "Please enter Postcode")]
        [Display(Name = "Post Code")]
        public Int32? Postcode { get; set; }

        [Display(Name = "Business Name")]
        public String BusinessName { get; set; }

        public Int32 CheckCustomer { get; set; }
        public IEnumerable<userTypesModel> listUserTypes { get; set; }

        public Int32 UserTypeID { get; set; }

        [Display(Name = "Title")]
        public string Title { get; set; }

        [Required(ErrorMessage = "Please select Title")]
        public string SelectedTitleItem { get; set; }

        public IEnumerable<SelectListItem> SelectedTitle { get; set; }

        [Display(Name = "Username")]
        [Required(ErrorMessage = "Please enter Username")]
        [StringLength(50, ErrorMessage = "Min. 6 characters allowed.", MinimumLength = 6)]
        [RegularExpression("^[a-zA-Z]+[a-zA-Z0-9]*$", ErrorMessage = "Username cannot start with a number")]
        //[Remote("ValidateUserName", "signUp", ErrorMessage = "UserName already taken!")]
        public string UserName { get; set; }

        [Required(ErrorMessage = "Please select ADSL provider")]
        [Display(Name = "Existing ADSL provider")]
        public Int32? ADSLprovider { get; set; }
        public IEnumerable<SelectListItem> SelectedADSL { get; set; }

       
        [Display(Name = "Provider Name")]
        public string ADSLproviderOther { get; set; }

        public DateTime? RegisterDateTime { get; set; }
        public String IPAddress { get; set; }

        [Required(ErrorMessage = "Please enter Password")]
        public string Password { get; set; }
        #endregion
       
        #region[plans]
        public string Name { get; set; }
        public IEnumerable<PlanDetailModel> listPlanDetail { get; set; }
        public Int32? PlanNamesDetailID { get; set; }
        #endregion
      
        #region[Plan Quota]
        public Int32? PlanQuotaID { get; set; }
        public IEnumerable<PlanQuotaModel> listPlanQuotaModel { get; set; }

        #endregion

        #region Configuration
        public IEnumerable<SubExtraDetailModel> listSubExtraModel { get; set; }
        public IEnumerable<SubExtraDetailModel> listSubExtraDetailModel { get; set; }
        public IEnumerable<SubHardwareDetailModel> listSubHardwareDetailModel { get; set; }
        public IEnumerable<SubHardwareDetailModel> listSubHardwareModel { get; set; }
        public Int32 SubExtrasDetailID { get; set; }
        public string strSubExtrasDetailID { get; set; }
        public string strSubHardwareDetailID { get; set; }
        #endregion

        #region[Extra Plan Quota]
        public Int32? ExtraPlanQuotaID { get; set; }
        public IEnumerable<ExtraPlanQuotaModel> listExtraPlanQuotaModel { get; set; }
        public string strExtraPlanQuotaID { get; set; }
        #endregion

        #region[Plan Quota]
        public string TypeName { get; set; }
        public string PlanDetailName { get; set; }
        public Int32? PlanQuotaValue { get; set; }
        public string PlanQuotaInterval { get; set; }
        public IEnumerable<signUpModel> listSignUpDetail { get; set; }
        public string ADSLName { get; set; }
        #endregion

        #region[Plan Names]
        [Required(ErrorMessage = "Please select Plan Name")]
        [Display(Name = "Plan Names")]
        public Int32? PlanNamesID { get; set; }
        public IEnumerable<SelectListItem> SelectedPlanNames { get; set; }
        #endregion

        #region[Enums]
        public enum enumPlanNames
        {
            //local
            TransACTResidential = 1,
            TransACTBusiness = 2,
            NationalADSL2 = 3,
            NakedDSL = 4,
            RegionalADSL2=5,
            BundleADSLHomephone=8,
            BundleADSLVOIP=9,
            BundleADSLHomephonePlusVOIP=10,
            NBNFibre12MDownload= 13,
            NBNFibre25MDownload = 14,
            NBNFibre50MDownload = 15,
            NBNFibre100MDownload = 16
            
            //server
           /* TransACTResidential = 1,
            NationalADSL2 = 2,
            NakedDSL = 3,
            TransACTBusiness = 4,
            RegionalADSL2=5,
            BundleADSLHomephone=8,
            BundleADSLVOIP=9,
            BundleADSLHomephonePlusVOIP=10*/

        }
        public enum enumNoServiceNumber
        {
            Naked=1,
            Bundle=2
 
        }

        public enum enumExtras
        {
            Telephony = 1,
            VOIP = 2,
            HardwareOptions=3

        }

        public enumPlanNames proPlanNames { get; set; }
        #endregion
      
        #region [Directory Listing/Connection Method]

        [Display(Name = "Directory Listing")]
        public Int32? DirectoryListingID { get; set; }
        public IEnumerable<SelectListItem> SelectedDirectoryListing { get; set; }

        [Display(Name = "Connection Method")]
        public Int32? ConnectionMethodID { get; set; }
        public IEnumerable<SelectListItem> SelectedConnectionMethod { get; set; }
        #endregion
    }

}


